import { createApp } from 'vue'

import App from './App.vue'
import { createPinia } from 'pinia'

import ElementPlus from 'element-plus'
import { ElMessage } from 'element-plus'
import 'element-plus/theme-chalk/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import axios from 'axios'
import router from './router/index'; // 导入路由
import store from './store/index'; // 导入 Vuex store
import VueVideoPlayer from '@videojs-player/vue'
import 'video.js/dist/video-js.css'

// 全局样式表
import "./assets/css/base.css"
const pinia = createPinia();
const app = createApp(App);
app.use(pinia);
app.use(ElementPlus)
app.use(VueVideoPlayer)
// 添加全局变量
app.config.globalProperties.$message = ElMessage
app.config.globalProperties.$axios = axios
// 注册全部element图标
// app.use(ElementPlus, { locale: zhCn })
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(store); // 使用 Vuex store
app.use(router); // 使用路由


app.mount('#app');
